package com.ec.bl.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ec.bl.domain.dto.RefundRecordDTO;
import com.ec.bl.domain.dto.RefundApprovalRequest;
import com.ec.bl.domain.dto.RefundQueryRequest;
import com.ec.bl.domain.entity.RefundRecord;
import com.ec.bl.domain.dto.RefundRequest;
import com.ec.common.domain.Result;

import java.util.List;

public interface RefundRecordService extends IService<RefundRecord> {

    /**
     * 创建退款申请
     */
    Result<Long> createRefundRequest(RefundRequest request);

    /**
     * 分页查询退款记录
     */
    Result<IPage<RefundRecordDTO>> getRefundRecordPage(RefundQueryRequest query);

    /**
     * 根据ID查询退款记录详情
     */
    Result<RefundRecordDTO> getRefundRecordById(Long id);

    /**
     * 审核退款申请
     */
    Result<Boolean> approveRefundRequest(RefundApprovalRequest request);

    /**
     * 完成退款
     */
    Result<Boolean> completeRefund(Long refundId);

    /**
     * 查询用户的退款记录
     */
    Result<List<RefundRecordDTO>> getRefundRecordsByUserId(Long elderlyUserId);

    /**
     * 删除退款记录
     */
    Result<Boolean> deleteRefundRecord(Long id);
}